package Java练习.字符串练习;

import java.util.Scanner;

public class 判断是不是对称字符串 {
    public static void main(String[] args) {
        //获取字符串
        Scanner sc= new Scanner(System.in);
        System.out.print("请输入要判断的字符串:");
        String str=sc.next();
        //字符串反转
        String new_str=new StringBuilder(str).reverse().toString();
        //判断:
        if (str.equals(new_str)){
            System.out.println("是");
        }
        else {
            System.out.println("不是");
        }


    }


}
